<template>
  <router-view />
</template>

<script setup lang="ts">
import { onMounted } from "vue";
import { useStore } from "vuex";

const store = useStore();

// 应用初始化
onMounted(() => {
  // 初始化认证状态
  store.dispatch("auth/initAuth");
});
</script>

<style lang="scss">
#app {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

// Element Plus 样式定制
.el-header {
  padding: 0 !important;
}

.el-main {
  padding: 0 !important;
}

.el-footer {
  padding: 0 !important;
}

// 链接样式
a {
  color: #409eff;
  text-decoration: none;

  &:hover {
    color: #66b1ff;
  }
}

// 响应式设计
@media (max-width: 768px) {
  .el-menu--horizontal {
    .el-menu-item {
      padding: 0 15px;
    }
  }
}
</style>
